﻿<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <BitmapImage x:Key="MyImageSource" UriSource="ms-appx:///Assets/BackgroundTexture.jpg" />
    <BitmapImage x:Key="LeftArrowImage" UriSource="ms-appx:///Assets/LeftArrow.png"/>
    <BitmapImage x:Key="RightArrowImage" UriSource="ms-appx:///Assets/RightArrow.png"/>
    <BitmapImage x:Key="UpArrowImage" UriSource="ms-appx:///Assets/UpArrow.png"/>
    <BitmapImage x:Key="DownArrowImage" UriSource="ms-appx:///Assets/DownArrow.png"/>

    <Color x:Key="GameButtonColor">#00ff00</Color>
    <Color x:Key="GameButtonMouseOverColor">#20ff20</Color>
    <Color x:Key="GameButtonMouseDownColor">#1c9537</Color>
    <Color x:Key="DisabledGameButtonColor">#808080</Color>
    <Color x:Key="DisabledGameButtonBorderColor">#666666</Color>
    <Color x:Key="BrickBorderColor">#949494</Color>
    <Color x:Key="CrateLocationColor">#ff5151</Color>
    <Color x:Key="WorkerBorderColor">#21ad41</Color>
    <Color x:Key="WorkerBackgroundColor">#27d34e</Color>
    <Color x:Key="DialogBackgroundColor">#383838</Color>
    
    <SolidColorBrush x:Key="MainFontBrush" Color="#e9e9e9"/>
    <SolidColorBrush x:Key="GameButtonBrush" Color="{StaticResource GameButtonColor}"/>
    <SolidColorBrush x:Key="GameButtonMouseDownBrush" Color="{StaticResource GameButtonMouseDownColor}"/>
    <SolidColorBrush x:Key="DisabledGameButtonBorderBrush" Color="{StaticResource DisabledGameButtonBorderColor}"/>
    <SolidColorBrush x:Key="DialogBackgroundBrush" Color="{StaticResource DialogBackgroundColor}"/>
    <SolidColorBrush x:Key="DialogForegroundBrush" Color="{StaticResource GameButtonColor}"/>
    <SolidColorBrush x:Key="BrickBorderBrush" Color="{StaticResource BrickBorderColor}"/>
    <SolidColorBrush x:Key="CrateLocationBrush" Color="{StaticResource CrateLocationColor}"/>
    <SolidColorBrush x:Key="WorkerBorderBrush" Color="{StaticResource WorkerBorderColor}"/>
    <SolidColorBrush x:Key="WorkerBackgroundBrush" Color="{StaticResource WorkerBackgroundColor}"/>
    <ImageBrush x:Key="CrateBackgroundBrush" ImageSource="ms-appx:///Assets/Crate.jpg"/>
    <ImageBrush x:Key="CrateOnTargetBackgroundBrush" ImageSource="ms-appx:///Assets/CrateOnTarget.jpg"/>
    <ImageBrush x:Key="BrickBackgroundBrush" ImageSource="ms-appx:///Assets/Brick.jpg"/>
    <ImageBrush x:Key="BackgroundBrush" ImageSource="{StaticResource MyImageSource}" Stretch="UniformToFill"/>
    
    <x:Int32 x:Key="AutoCloseDialogWidth">300</x:Int32>
    <x:Int32 x:Key="AutoCloseDialogHeight">150</x:Int32>

    <Style x:Key="GameTextBlockStyle" TargetType="TextBlock">
        <Setter Property="FontFamily" Value="Comic Sans Serif"/>
        <Setter Property="FontSize" Value="20"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="Foreground" Value="{StaticResource MainFontBrush}"/>
        <Setter Property="Padding" Value="10"/>
    </Style>

    <Style x:Key="GameMessageTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource GameTextBlockStyle}">
        <Setter Property="TextAlignment" Value="Center"/>
        <Setter Property="Width" Value="{StaticResource AutoCloseDialogWidth}"/>
        <Setter Property="Height" Value="{StaticResource AutoCloseDialogHeight}"/>
        <Setter Property="Padding" Value="0,50,0,0"/>
        <Setter Property="TextWrapping" Value="Wrap"/>
    </Style>
    
    <Style x:Key="MoveButtonStyle" TargetType="Button">
        <Setter Property="Width" Value="70"/>
        <Setter Property="Height" Value="70"/>
        <Setter Property="FontFamily" Value="Comic Sans Serif"/>
        <Setter Property="FontSize" Value="15"/>
        <Setter Property="FontWeight" Value="Bold"/>
        <Setter Property="HorizontalAlignment" Value="Center"/>
        <Setter Property="Margin" Value="5"/>
        <Setter Property="Padding" Value="0,50,0,0"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border 
                        Name="ContentBorder"
                        Width="Auto" 
                        Height="Auto" 
                        CornerRadius="2" 
                        BorderBrush="{StaticResource GameButtonMouseDownBrush}"
                        BorderThickness="1"
                        Background="{StaticResource GameButtonBrush}">
                        <ContentPresenter 
                            HorizontalAlignment="Center" 
                            VerticalAlignment="Center"/>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames 
                                            Storyboard.TargetName="ContentBorder" 
                                            Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource GameButtonMouseDownColor}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Normal">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames 
                                            Storyboard.TargetName="ContentBorder" 
                                            Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource GameButtonMouseDownColor}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="PointerOver">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames 
                                            Storyboard.TargetName="ContentBorder" 
                                            Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource GameButtonMouseOverColor}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames 
                                            Storyboard.TargetName="ContentBorder" 
                                            Storyboard.TargetProperty="Background">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DisabledGameButtonBorderColor}" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames 
                                            Storyboard.TargetName="ContentBorder" 
                                            Storyboard.TargetProperty="BorderBrush">
                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource DisabledGameButtonBorderColor}" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>